package com.helpfile;

import android.app.Activity;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.view.View;
import android.widget.Button;
import android.app.AlertDialog;


public class helpboxes  extends Activity implements OnClickListener {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        // set a click listener on the alert button
        Button homehelp = (Button) findViewById(R.id.homebtn);
        homehelp.setOnClickListener(this);
        
        Button testhelp = (Button) findViewById(R.id.testbtn);
        testhelp.setOnClickListener(this);
        
        Button onehelp = (Button) findViewById(R.id.onebtn);
        onehelp.setOnClickListener(this);
        
        Button graphhelp = (Button) findViewById(R.id.measbtn);
        graphhelp.setOnClickListener(this);

    }
 
    public void onClick(View view) {
         // the Alert button the activated
        if (view == findViewById(R.id.homebtn)) {
 
            // prepare the alert box
            AlertDialog.Builder alertbox = new AlertDialog.Builder(this);
 
            // set the message to display
            alertbox.setMessage(R.string.home_help);
 
            // add a neutral button to the alert box and assign a click listener
            alertbox.setNeutralButton("Ok", null);
            
             // show it
            alertbox.show();
                   
        }
 
        if (view == findViewById(R.id.testbtn)) {
        	 
            // prepare the alert box
            AlertDialog.Builder alertbox = new AlertDialog.Builder(this);
 
            // set the message to display
            alertbox.setMessage(R.string.test_help);  
            // add a neutral button to the alert box and assign a click listener
            alertbox.setNeutralButton("Ok", null);
            
             // show it
            alertbox.show();
                   
        }        
     
        if (view == findViewById(R.id.onebtn)) {
        	 
            // prepare the alert box
            AlertDialog.Builder alertbox = new AlertDialog.Builder(this);
 
            // set the message to display
            alertbox.setMessage(R.string.one_help);
 
            // add a neutral button to the alert box and assign a click listener
            alertbox.setNeutralButton("Ok", null);
            
             // show it
            alertbox.show();
                   
        }
      
        if (view == findViewById(R.id.measbtn)) {
        	 
            // prepare the alert box
            AlertDialog.Builder alertbox = new AlertDialog.Builder(this);
 
            // set the message to display
            alertbox.setMessage(R.string.meas_help);
 
            // add a neutral button to the alert box and assign a click listener
            alertbox.setNeutralButton("Ok", null);
            
             // show it
            alertbox.show();
                   
        }
     }
}